Adapt code from AquaEmacs to handle occasional blank menus.
authorJan D. <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 14:50:19 +0000 (15:50 +0100)
committerJan D. <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 14:50:19 +0000 (15:50 +0100)
commit1f217551de7ae29c51e8dc24517edcb6a02cb4c2
treeeb18ee0319a257cfe5cd27996ab1e5c9588efaa6
parent27275da251a99097a8396fc664b3d2e894d7a23b
Adapt code from AquaEmacs to handle occasional blank menus.

* nsmenu.m (trackingMenu): New variable.
(NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and
NS_IMPL_COCOA.
(trackingNotification): New method (from AquaEmacs).
(menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
from AquaEmacs.
(syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.

* nsterm.m (ns_term_init): Subscribe for notifications
NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
to method trackingNotification in EmacsMenu.
src/ChangeLog
src/nsmenu.m
src/nsterm.m